<%@ page language="java" contentType="text/html; charset=UTF-8"  pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
<!DOCTYPE html>
<html lang="zh">

<head>
  <meta charset="UTF-8">
  <title>添加</title>
  <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
  <link rel='stylesheet' href='https://res.wx.qq.com/open/libs/weui/0.3.0/weui.css'>
  <c:set value="${pageContext.request.contextPath}" var="path" scope="page" />
  <link rel="stylesheet" href="${path}/static/style/add.css">
  <script src="${path}/static/script/jQuery 3.5.1.min.js"></script>
</head>

<body>
  <!-- partial:index.partial.html -->
  <div class="container">
    <div class="weui_cells_title">上传</div>
    <div class="weui_cells weui_cells_form">
      <div class="weui_cell">
        <div class="weui_cell_bd weui_cell_primary">
          <form method="POST" action="/Discovery/add" enctype="multipart/form-data" class="img-form">
            <input type="text" name="title" id="discovery-title" placeholder="这一刻的想法..." />
            <div class="weui_uploader">
              <div class="weui_uploader_bd">
                <ul class="weui_uploader_files js_previews">
                  <!-- 预览图插入到这 -->
                </ul>
                <div class="weui_uploader_input_wrp">
                  <input class="weui_uploader_input js_file" type="file"
                    accept="image/jpg,image/jpeg,image/png,image/gif" multiple="" id="discovery-img" name="photo">
                </div>
              </div>
              <input type="submit" value="发布" class="btn" id="relbtn" />
              <input type="reset" value="清空" class="btn" />
          </form>
        </div>
      </div>
    </div>
  </div>
  </div>
  <div class="weui_dialog_alert" style="display: none;">
    <div class="weui_mask"></div>
    <div class="weui_dialog">
      <div class="weui_dialog_hd"><strong class="weui_dialog_title">警告</strong></div>
      <div class="weui_dialog_bd">弹窗内容，告知当前页面信息等</div>
      <div class="weui_dialog_ft">
        <a href="javascript:;" class="weui_btn_dialog primary">确定</a>
      </div>
    </div>
  </div>

  <div class="preview">
    <div class="weui_mask"></div>
    <img src="" alt="" />
    <a href="javascript:;" class="delete" id="delete">delete</a>
  </div>
  <!-- partial -->
  <script src="${path}/static/script/add.js"></script>
</body>

</html>